package edu.upf.opencities.dao;

import java.util.List;

import edu.upf.opencities.datamodel.User;

public interface UserDAO {

//	/**
//	 * Auxiliar method to load a dummy user
//	 */
//	public void createUser();
	
	/**
	 * DAO to register a new user
	 * 
	 * @param userName
	 * @param userLastName
	 * @param mail
	 * @param isAdmin
	 * @param userPassword
	 * @param company
	 * @param country
	 * 
	 * @return
	 */
	public boolean registerUser(String userName, String userLastName, String mail, boolean isAdmin, String userPassword, String company, String country);

	
	/**
	 * DAO to update a user
	 * 
	 * @param userName
	 * @param userLastName
	 * @param mail
	 * @param isAdmin
	 * @param userPassword
	 * @param company
	 * @param country
	 * 
	 * @return
	 */
	public boolean updateUser(String userName, String userLastName, String mail, boolean isAdmin, String userPassword, String company, String country);

	/**
	 * DAO to obtain a user
	 * 
	 * @param mail
	 * @return
	 */
	public User getUser(String mail);
	
	/**
	 * DAO to delete a user
	 * 
	 * @param mail
	 * @param userPassword
	 */
	public void deleteUser(String mail , String userPassword);
	
	/**
	 * DAO to control the login
	 * 
	 * @param mail
	 * @param userPassword
	 * @return
	 */
	public boolean login(String mail, String userPassword);
	
	/**
	 * DAO to obtain a list with all users
	 * 
	 * @return
	 */
	public List<User> getAllUsers();
}
